/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package baiwa.rta.model;

import java.io.Serializable;

/**
 *
 * @author jirapatjantsakool
 */
public class RMcphdrPKModel extends BaseModel implements Serializable {
    private int cphid;
    private String cphdocno;

    public RMcphdrPKModel() {
    }

    public RMcphdrPKModel(int cphid, String cphdocno) {
        this.cphid = cphid;
        this.cphdocno = cphdocno;
    }

    public int getCphid() {
        return cphid;
    }

    public void setCphid(int cphid) {
        this.cphid = cphid;
    }

    public String getCphdocno() {
        return cphdocno;
    }

    public void setCphdocno(String cphdocno) {
        this.cphdocno = cphdocno;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) cphid;
        hash += (cphdocno != null ? cphdocno.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RMcphdrPKModel)) {
            return false;
        }
        RMcphdrPKModel other = (RMcphdrPKModel) object;
        if (this.cphid != other.cphid) {
            return false;
        }
        if ((this.cphdocno == null && other.cphdocno != null) || (this.cphdocno != null && !this.cphdocno.equals(other.cphdocno))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "baiwa.rta.model.RmcphdrPK[ cphid=" + cphid + ", cphdocno=" + cphdocno + " ]";
    }
    
}
